# -*- coding: utf-8 -*-

import config as cfg
from lib.app import *
from lib.log import *

logger = Logger(cfg.debug)
try:
    app = App(cfg)
    if app.dialog():
	app.saveData()
	data = app.prepareData()
	app.calc(data)

except Exception, e:
    logger.error(e)
